package com.md.api.login;

import com.md.model.request.login.AzureSamlLoginRequest;
import com.md.model.response.AzureSamlLoginResponse;
import com.md.model.system.CommonResult;
import com.md.value.constants.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @author 刘骄阳
 * 2024-03-24 0:26
 */
@Api(tags = {ApiConstants.LOGIN_CENTER})
public interface LoginApi {
  String PATH = "/login-center";

  /**
   * 微软授权登录-saml
   *
   * @param request 登录请求
   * @return 操作结果
   */
  @PostMapping(PATH + "/azure/saml")
  @ApiOperation("微软授权登录-saml")
  CommonResult<AzureSamlLoginResponse> azureSaml(@Valid @ApiParam("授权登录请求实体")
                                                 @RequestBody AzureSamlLoginRequest request);

}
